<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-banner-edit" enctype="multipart/form-data">
            <input id="id" name="id" th:value="${banner.id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">标题：</label>
                <div class="col-sm-8">
                    <input id="bannerTitle" name="bannerTitle" th:value="${banner.bannerTitle}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">类型：</label>
                <div class="col-sm-8">
                	<select id="bannerType" class="form-control" th:with="type=${@dictService.selectDictData('m_banner_type')}">
	                    <option th:each="dict : ${type}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" th:field="*{banner.bannerType}"></option>
	                </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">排序：</label>
                <div class="col-sm-8">
                    <input id="orderBy" name="orderBy" th:value="${banner.orderBy}" class="form-control" type="number" min="1" max="9999">
                </div>
            </div>
            <div class="form-group">
               <label class="col-sm-3 control-label">图片：</label>
               <div class="col-sm-8">
                   <div class="input-group">
                       <input id="photoCover" class="form-control" th:value="${banner.bannerUrl}" readonly type="text">
                       <label class="input-group-btn">
                           <input id="file" type="file" name="bannerUrl" style="margin-left:-9999px; position: absolute;">
                           <span class="btn btn-default">选择文件</span>
                       </label>
                   </div>
               </div>
            </div>
            <div id="showimg" class="form-group" style="display: none;">	
				<label class="col-sm-3 control-label"></label>
				<div class="col-sm-8">
					<img th:src="${imageUrl}" width="400px" height="200px"/>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">链接：</label>
				<div class="col-sm-8">
					<input id="linkUrl" name="linkUrl" th:value="${banner.linkUrl}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">状态：</label>
				<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_show_hide')}">
					<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
						<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{banner.status}">
						<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script th:src="@{/ruoyi/business/banner/edit.js}"></script>
</body>
</html>
